(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <utility/tagitem.h>
#include <proto/utility.h>
IPTR GetTagData()
SYNOPSIS
Tag tagValue
IPTR defaultVal
struct TagItem * tagList

LOCATION
In UtilityBase at offset 6
FUNCTION
Searches the TagList for the Tag specified, if it exists, then returns the ti_Data field of that Tag, otherwise returns the supplied default value.

INPUTS
tagValue
Tag to search for.
defaultVal
Default value for the Tag.
tagList
Pointer to first TagItem in the list.
RESULT
The data value if the Tag exists, or the default value if it doesn't.

NOTES
If the input TagList doesn't exist (eg for some reason equals NULL), then the return value will be NULL. This way you can check for broken code, whereas returing the default would allow code that is possibly buggy to still seem to work. (Until you tried to do anything special at least).

EXAMPLE
struct Window *window;	    \* The Window we are creating *\
struct TagItem *wintags;    \* Tags for this window *\

\* Find out the value for the WA_Left tag *\
window->Left = GetTagData( WA_Left, 320, wintags )

BUGS
SEE ALSO
utility/tagitem.h
INTERNALS
HISTORY
27.03.1997 ldp
Added copyright line
26.03.1997 digulla
Polish.

return value and argument is IPTR

27.01.1997 ldp
Polish
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.
24.10.1996 aros
Use proper Amiga datatypes (eg: ULONG not unsigned long)
24.10.1996 aros
Use the official AROS macros over the __AROS versions.
23.10.1996 aros
Formatted

Added parens to all assignments which are used truth expressions

22.10.1996 aros
Some more utility.library functions.